import React from 'react';
import dynamic from 'dva/dynamic';
import { Route } from 'dva/router';

export default function myRoute(app) {

    const My = dynamic({
        app,
        models: () => {
            return [
                import(/* webpackChunkName: "myModel" */'../models/my/myModel'),
            ];
        },
        component: () => import(/* webpackChunkName: "my" */'../routes/my/my'),
    });

    return (
        [
            <Route key="/my" exact path="/my" component={My}/>
        ]
    );
}
